#pragma once

#include "DataElement.h"


class ParserBase
{
public:
	ParserBase(const blocktype&);
	virtual ~ParserBase();

public:
	virtual int ParserBlk(const char* IN pStart, const char* IN pEnd, char*& OUT pNextStart, const condition* = NULL) = 0;
	int SetBlockType(const blocktype& type);
protected:
	bool IsMyType(const blocktype&);
protected:
	blocktype m_BlkType;

};

/************************************************************************/
/*                                                                      */
/************************************************************************/

class ChainNode
{
public:
	ChainNode(void);
	virtual ~ChainNode(void);

public:
	void AddTail(ParserBase*, bool bautodelete = true);

protected:
	ParserBase* m_pTail;
	bool m_bAutoDelete;

};
